# $Id: PKGBUILD 83390 2013-01-30 22:46:54Z bluewind $
# Maintainer:
# Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
# Contributor: Thorsten Tasch <tht@thorstentasch.de>
# Contributor: JJDaNiMoTh <jjdanimoth@gmail.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=rsnapshot
pkgver=1.3.1
pkgrel=4
pkgdesc="A remote filesystem snapshot utility"
arch=('any')
url="http://www.rsnapshot.org"
license=('GPL')
depends=('perl' 'rsync' 'openssh' 'perl-lchown')
backup=('etc/rsnapshot.conf')
source=("http://www.rsnapshot.org/downloads/${pkgname}-${pkgver}.tar.gz"
        'rsnapshot')
md5sums=('588f92995dcf60a6ea6df8d94a017e7e'
         '4cd16eaa51d58a652cffde945985e91c')

build() {
	cd ${srcdir}/${pkgname}-${pkgver}
	./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
	sed -i 's:/usr/bin/pod2man:/usr/bin/core_perl/pod2man:' Makefile
	make
}

package() {
	cd ${srcdir}/${pkgname}-${pkgver}

	make DESTDIR=${pkgdir} install
	mv ${pkgdir}/etc/rsnapshot.conf.default ${pkgdir}/etc/rsnapshot.conf
	install -Dm644 ${srcdir}/rsnapshot ${pkgdir}/etc/logrotate.d/rsnapshot
}
